home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games: Greatest Hits 1996 / Amiga Games: Greatest Hits 1996.iso / spiele / publicdomain / battleduel / battleduel_install < prev    next >
Text File  |  1996-08-02  |  8KB  |  263 lines

  1. ;======================================================================
  2. ;
  3. ; BattleDuel Install Script $VER: Install 1.5.42 (2.8.96)
  4. ;
  5. ; Copyright © 1995-1996 Jochen Terstiege
  6. ;
  7. ;======================================================================
  8. ;
  9. ;======================================================================
  10. ; language strings
  11. ;======================================================================
  12.  
  13. (if (= @language "deutsch")
  14.     (
  15.         (set #hello "\nWillkommen zur BattleDuel Installation\nund Update\n\n\Version 1.5.42")
  16.         (set #update (cat "Sie haben BattleDuel auf ihrem System schon installiert. "
  17.                                 "Alle alten Dateien werden gelöscht und die neuen werden installiert."))
  18.         (set #select_destination "Bitte wählen Sie aus, wo das BattleDuel-Verzeichnis erzeugt werden soll")
  19.         (set #destination_help (cat "Wählen Sie eine Partition oder ein Verzeichnis aus. "
  20.                                             "Ein Verzeichnis mit dem Namen 'BattleDuel' wird dort erzeugt."))
  21.         (set #install_to1 "\nBattleDuel nach \"")
  22.         (set #install_to2 "\" installieren?")
  23.         (set #startup "Ergänze user-startup")
  24.         (set #startup_help "Dieser Assign wird von BattleDuel gebraucht")
  25.         (set #have_fun "Viel Spaß mit BattleDuel...")
  26.         (set #which_chipset "Welchen Chipsatz haben Sie?")
  27.         (set #chipset_help (cat "Wenn Sie einen Amiga 4000, A1200 oder eine Grafikkarte "
  28.                                         "besitzen, dann müssen Sie AGA wählen, ansonsten ECS!"))
  29.         (set #want_mwb_icons "Wollen Sie MagicWB Icons installieren?")
  30.         (set #mwb_icons (cat "MagicWB ist ein Set von Icons mit 8 Farben.\n"
  31.                                     "MagicWB ist © by Martin Huttenloher"))
  32.         (set #error_extract (cat "Fehler beim Entpacken der Datei: "))
  33.     )
  34.     (
  35.         (set #hello "\nWelcome to the BattleDuel Installation\nand update\n\n\Version 1.5.42")
  36.         (set #update (cat "You already have BattleDuel installed on your system. "
  37.                                 "All old files will be deleted and the new ones installed."))
  38.         (set #select_destination "Select the location to install the BattleDuel directory")
  39.         (set #destination_help (cat "Choose a destination partition or directory. "
  40.                                             "A directory called 'BattleDuel' will be created there."))
  41.         (set #install_to1 "\nInstall BattleDuel to \"")
  42.         (set #install_to2 "\" ?")
  43.         (set #startup "Adding assign to user-startup")
  44.         (set #startup_help "This assign is needed by BattleDuel!")
  45.         (set #have_fun "Have fun with BattleDuel...")
  46.         (set #which_chipset "Which Chipset do you have?")
  47.         (set #chipset_help (cat "If you own an Amiga 4000, A1200 or a graphicboard then "
  48.                                         "you must select AGA, otherwise you must select ECS!"))
  49.         (set #want_mwb_icons "Do you want to install MagicWB icons?")
  50.         (set #mwb_icons (cat "MagicWB is a set of nice icons with 8 colors.\n"
  51.                                     "MagicWB is © by Martin Huttenloher"))
  52.         (set #error_extract (cat "Error while extracting from file: "))
  53.     )
  54. )
  55.  
  56. ;======================================================================
  57. ; variables
  58. ;======================================================================
  59.  
  60. (set inputdir    (pathonly @icon))        ; from where we were started
  61. (set bd_drawer "BattleDuel")            ; destination drawer name
  62. (set bd_dest    (getassign "BD"))        ; default destination
  63.  
  64. ;======================================================================
  65. ; welcome
  66. ;======================================================================
  67.  
  68. (message #hello)
  69.  
  70. ;======================================================================
  71. ; already there?
  72. ;======================================================================
  73.  
  74. (if (<> bd_dest "")
  75.     (; update
  76.         (set update true)
  77.         (message #update)
  78.     )
  79.     (; first installation
  80.         (set update false)
  81.         (set bd_dest
  82.             (askdir
  83.                 (prompt #select_destination)
  84.                 (default "Work:")
  85.                 (help #destination_help)
  86.             )
  87.         )
  88.     )
  89. )
  90. (set @default-dest bd_dest)
  91.  
  92. ;======================================================================
  93. ; delete old files
  94. ;======================================================================
  95.  
  96. ;(if (= update true)
  97. ;    (
  98. ;        (set del_pattern "#?")
  99. ;        (foreach bd_dest del_pattern
  100. ;            (delete (tackon bd_dest @each-name))
  101. ;        )
  102. ;    )
  103. ;)
  104.  
  105. ;======================================================================
  106. ; make directory
  107. ;======================================================================
  108.  
  109. (if (= update false)
  110.     (
  111.         (set bd_dest (tackon bd_dest bd_drawer))
  112.         (message (cat #install_to1 bd_dest #install_to2))
  113.         (makedir bd_dest (infos))
  114.         (makeassign "BD" bd_dest)
  115.     )
  116. )
  117.  
  118. ;======================================================================
  119. ; ask for chipset
  120. ;======================================================================
  121.  
  122. (set aga
  123.     (askbool
  124.         (prompt #which_chipset)
  125.         (help #chipset_help)
  126.         (choices "ECS" "AGA/Graphicboard")
  127.         (default 1)
  128.     )
  129. )
  130.  
  131. ;======================================================================
  132. ; extract files
  133. ;======================================================================
  134.  
  135. (procedure extract
  136.     (set lha (cat "decrunch -a -m -q x \"" (tackon inputdir current) ".lha\" * " dir_dest))
  137.     (working "Installing " current)
  138.     (if (<> (run lha) 0)
  139.         (message #error_extract current)
  140.     )
  141.  
  142. ;======================================================================
  143. ; patch landscapes with balloon (registered v1.03 and v1.4.80)
  144. ;======================================================================
  145.  
  146. (if (and (= update true)
  147.             (    (or (exists ("BD:BattleDuel.key"))
  148.                 (exists ("devs:BattleDuel.key"))
  149.                 (exists ("s:BattleDuel.key"))    )
  150.     ))
  151.     (
  152.         (if (= (getsize "BD:BattleDuel") 96424)
  153.             (if (= aga 1)
  154.                 ( (set current "Landscapes_Patch3_ECS") (set dir_dest "RAM:") (extract) (execute "RAM:patch") )
  155.                 ( (set current "Landscapes_Patch3_AGA") (set dir_dest "RAM:") (extract) (execute "RAM:patch") )
  156.             )
  157.         )
  158.         (if (= (getsize "BD:BattleDuel") 131236)
  159.             (if (= aga 1)
  160.                 ( (set current "Landscapes_Patch4_ECS") (set dir_dest "RAM:") (extract) (execute "RAM:patch") )
  161.                 ( (set current "Landscapes_Patch4_AGA") (set dir_dest "RAM:") (extract) (execute "RAM:patch") )
  162.             )
  163.         )
  164.     )
  165. )
  166.  
  167. (complete 0)
  168. (set current "Program")                (set dir_dest "BD:") (extract)
  169. (complete 10)
  170. (if (= aga 1)
  171.     ( (set current "Gfx_ECS")           (set dir_dest "BD:Gfx/ECS/") (extract) )
  172.     ( (set current "Gfx_AGA")           (set dir_dest "BD:Gfx/AGA/") (extract) )
  173. )
  174. (complete 20)
  175. (if (= update false)
  176. (
  177.     (if (= aga 1)
  178.         ( (set current "Landscapes_ECS") (set dir_dest "BD:Landscapes/ECS/") (extract) )
  179.         ( (set current "Landscapes_AGA") (set dir_dest "BD:Landscapes/AGA/") (extract) )
  180.     )
  181. ) )
  182. (complete 30)
  183. (if (or (exists ("BD:BattleDuel.key"))
  184.         (exists ("devs:BattleDuel.key"))
  185.         (exists ("s:BattleDuel.key"))
  186.     )
  187.     (if (= aga 1)
  188.         ( (set current "Gfx_ECS_Reg")    (set dir_dest "BD:Gfx/ECS/") (extract) )
  189.         ( (set current "Gfx_AGA_Reg")    (set dir_dest "BD:Gfx/AGA/") (extract) )
  190.      )
  191. )
  192. (complete 40)
  193. (set current "Mods")                   (set dir_dest "BD:Mods/") (extract)
  194. (complete 50)
  195. (set current "Settings")               (set dir_dest "BD:Settings/") (extract)
  196. (complete 60)
  197.  
  198. ;======================================================================
  199. ; copy selected language
  200. ;======================================================================
  201.  
  202. (if (= @language "deutsch")
  203.     ( (set current "Deutsch") (set dir_dest "BD:") (extract) )
  204.     ( (set current "English") (set dir_dest "BD:") (extract) )
  205. )
  206. (complete 70)
  207.  
  208. ;======================================================================
  209. ; add MagicWB icons?
  210. ;======================================================================
  211.  
  212. (set mwb
  213.     (askbool
  214.         (prompt #want_mwb_icons)
  215.         (help #mwb_icons)
  216.         (choices "Yes" "No")
  217.         (default 1)
  218.     )
  219. )
  220.  
  221. (if (= mwb 1)
  222.     ( (set current "MWB_Icons") (set dir_dest "BD:") (extract) )
  223.     ( (set current "Icons") (set dir_dest "BD:") (extract) )
  224. )
  225. (complete 80)
  226.  
  227. ;======================================================================
  228. ; set tooltypes
  229. ;======================================================================
  230.  
  231. (if (= aga 1)
  232.     (tooltype
  233.         (dest "BD:BattleDuel")
  234.         (settooltype "DISPLAY_ID"   "0x0")
  235.         (settooltype "DISPLAY_TYPE" "ECS")
  236.     )
  237.     (tooltype
  238.         (dest "BD:BattleDuel")
  239.         (settooltype "DISPLAY_ID"   "0x0")
  240.         (settooltype "DISPLAY_TYPE" "AGA")
  241.     )
  242. )
  243. (complete 90)
  244.  
  245. ;======================================================================
  246. ; modify user-startup
  247. ;======================================================================
  248.  
  249. (if (= update false)
  250.     (
  251.         (startup "BattleDuel"
  252.             (prompt #startup)
  253.             (command (cat "Assign >NIL: BD: " bd_dest))
  254.             (help #startup_help)
  255.         )
  256.     )
  257. )
  258.  
  259. (complete 100)
  260.  
  261. (exit #have_fun)
  262.